<form name="editForm">
	<div class="form-group">
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>员工号：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.employeeNo.$dirty && editForm.employeeNo.$invalid}">
			   <input name="employeeNo" maxLength="45" class="form-control" ng-model="editModel.employee.employeeNo" required>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>中文名字：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.chineseName.$dirty && editForm.chineseName.$invalid}">
			   <input name="chineseName" class="form-control"ng-model="editModel.employee.chineseName" maxLength="45" required>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">英文名字：</div>
			<div class="col-sm-8 col-md-8 form-input">
			   <input name="englishName" class="form-control"ng-model="editModel.employee.englishName" maxLength="45">
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>性别：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.esex.$dirty && editForm.esex.$invalid}">
			   <select name="esex" id="esex" class="form-control" ng-model="editModel.employee.sex" required>
                                    <option value=""></option>
                                    <option value="1">男</option>
                                    <option value="2">女</option>
               </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">邮箱：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.email.$dirty && editForm.email.$invalid}">
			   <input name="email" class="form-control"ng-model="editModel.employee.email"
			   		  ng-pattern="/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/" maxLength="45" >
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>首次工作日期：</div>
			<div class="col-sm-8 col-md-8 form-input">
			   <div class="input-group" ng-class="{ 'has-error' : editForm.firstDate.$dirty && editForm.firstDate.$invalid }">
						<input name="firstDate" 
							   ng-model="editModel.employee.firstDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   is-open="viewModel.editFirstDateOpnened"
							   ng-click="viewModel.editFirstDateOpen($event)"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       required
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editFirstDateOpen($event)"><i class="fa-calendar"></i></span>
				</div>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>入职日期：</div>
			<div class="col-sm-8 col-md-8 form-input" >
			   <div class="input-group" ng-class="{ 'has-error' : editForm.entryDate.$dirty && editForm.entryDate.$invalid }">
						<input name="entryDate" 
							   ng-model="editModel.employee.entryDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   ng-click="viewModel.editEntryDateOpen($event)"
							   is-open="viewModel.editEntryDateOpnened"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       required
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editEntryDateOpen($event)"><i class="fa-calendar"></i></span>
				</div>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>年假可使用日期：</div>
			<div class="col-sm-8 col-md-8 form-input" >
			   <div class="input-group" ng-class="{ 'has-error' : editForm.annualLeaveDate.$dirty && editForm.annualLeaveDate.$invalid }">
						<input name="annualLeaveDate" 
							   ng-model="editModel.employee.annualLeaveDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   ng-click="viewModel.editAnnualLeaveDateOpen($event)"
							   is-open="viewModel.editAnnualLeaveDateOpnened"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       required
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editAnnualLeaveDateOpen($event)"><i class="fa-calendar"></i></span>
				</div>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">员工类型：</div>
			<div class="col-sm-8 col-md-8 form-input">
			   <select name="employeeType" id="employeeType" class="form-control" ng-model="editModel.employee.employeeType">
                                    <option value="1">正式</option>
                                    <option value="2">协力</option>
                                    <option value="3">兼职</option>
                                    <option value="4">其他</option>
               </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">员工类别：</div>
			<div class="col-sm-8 col-md-8 form-input">
			   <select name="employeeCategory" id="employeeCategory" class="form-control" ng-model="editModel.employee.employeeCategory">
                                    <option value="1">普通员工</option>
                                    <option value="2">经理</option>
               </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title">员工级别：</div>
			<div class="col-sm-8 col-md-8 form-input">
			   <select name="level" id="level" class="form-control" ng-model="editModel.employee.level">
                                    <option value="13" ng-selected="editModel.employee.level==13">13</option>
                                    <option value="14" ng-selected="editModel.employee.level==14">14</option>
                                    <option value="15" ng-selected="editModel.employee.level==15">15</option>
                                    <option value="16" ng-selected="editModel.employee.level==16">16</option>
                                    <option value="17" ng-selected="editModel.employee.level==17">17</option>
                                    <option value="18" ng-selected="editModel.employee.level==18">18</option>
                                    <option value="19" ng-selected="editModel.employee.level==19">19</option>
                                    <option value="20" ng-selected="editModel.employee.level==20">20</option>
                                    <option value="21" ng-selected="editModel.employee.level==21">21</option>
                                    <option value="22" ng-selected="editModel.employee.level==22">22</option>
                                    <option value="23" ng-selected="editModel.employee.level==23">23</option>
                                    <option value="24" ng-selected="editModel.employee.level==24">24</option>
                                    <option value="25" ng-selected="editModel.employee.level==25">25</option>
                                    <option value="26" ng-selected="editModel.employee.level==26">26</option>
                                    <option value="27" ng-selected="editModel.employee.level==27">27</option>
                                    <option value="28" ng-selected="editModel.employee.level==28">28</option>
                                    <option value="29" ng-selected="editModel.employee.level==29">29</option>
                                    <option value="30" ng-selected="editModel.employee.level==30">30</option>
               </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>所在地：</div>
			<div class="col-sm-8 col-md-8 form-input"
				 ng-class="{ 'has-error' : editForm.regionType.$dirty && editForm.regionType.$invalid }">
				<select id="regionType" 
						name="regionType"
						class="form-control" 
						ng-model="editModel.employee.regionType" 
						required>
                        <option ng-repeat="dictionary in viewModel.regionTypeData" value="{{dictionary.dicCd}}" ng-selected="dictionary.dicCd==editModel.employee.regionType">{{dictionary.dicName}}</option>
			    </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>账号名：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.userName.$dirty && editForm.userName.$invalid}">
			   <input name="userName" maxLength="45" class="form-control" ng-model="editModel.employee.userName" required>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>权限：</div>
			<div class="col-sm-8 col-md-8 form-input" ng-class="{ 'has-error' : editForm.privilegeGroupId.$dirty && editForm.privilegeGroupId.$invalid }">
			   <select name="privilegeGroupId" 
			   		   id="privilegeGroupId" 
			   		   class="form-control" 
			   		   ng-model="editModel.employee.privilegeGroupId" required>
                        <option value=""></option>
                        <option ng-repeat="dictionary in editModel.privilegeGroupList" value="{{dictionary.privilegeGroupId}}">{{dictionary.privilegeGroupName}}</option>
               </select>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>公司：</div>
			<div class="col-sm-8 col-md-8 form-input">
				<div class="input-group">
					<input name="corporation" 
						   type="text" class="form-control" disabled 
						   ng-model="{true:'无',
									  false: '(' + editModel.employee.corporationCode + ')'+editModel.employee.corporationName}
									  [editModel.employee.corporationId==null]">
					<span class="input-group-btn">
						<button type="button" 
							data-toggle="modal" 
							ng-click="viewCorporationModel.chooseDelete()"
							class="btn btn-danger btn-primary"
							data-backdrop="static">清空</button>
						<button type="button" 
							data-toggle="modal" 
							class="btn btn-primary" 
							data-backdrop="static" 
							ng-click="viewCorporationModel.chooseUpde()">选择</button>
					</span>
				</div>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>开始时间：</div>
			<div class=" col-sm-8 col-md-8 form-input">
			  	<div class="input-group col-sm-5 col-md-5 col-lg-5" style="width: 41.7%;" ng-class="{ 'has-error' : editForm.corporationFromDate.$dirty && editForm.corporationFromDate.$invalid }">
						<input name="corporationFromDate" 
							   ng-model="editModel.employee.corporationFromDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   is-open="viewModel.editCorporationFromDateOpnened"
							   ng-click="viewModel.editCorporationFromDateOpen($event)"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       required
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editCorporationFromDateOpen($event)"><i class="fa-calendar"></i></span>
				</div>
				<div class="col-sm-2 col-md-2 form-title-center" style="width: 16.5%;">至</div>
				<div class="input-group col-sm-5 col-md-5" style="width: 41.7%;">
						<input name="corporationThruDate" 
							   ng-model="editModel.employee.corporationThruDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   is-open="viewModel.editCorporationThruDateOpnened"
							   ng-click="viewModel.editCorporationThruDateOpen($event)"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editCorporationThruDateOpen($event)"><i class="fa-calendar"></i></span>
					</div>	
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>部门：</div>
			<div class="col-sm-8 col-md-8 form-input">
				<div class="input-group">
					<input name="department" 
						   type="text" class="form-control" disabled 
						   ng-model="{true:'无',
									  false: '(' + editModel.employee.departmentCode + ')'+editModel.employee.departmentName}
									  [editModel.employee.departmentId==null]">
					<span class="input-group-btn">
						<button type="button" 
							data-toggle="modal" 
							ng-click="viewDepartmentModel.chooseDelete()"
							class="btn btn-danger btn-primary"
							data-backdrop="static">清空</button>
						<button type="button" 
							data-toggle="modal" 
							class="btn btn-primary" 
							data-backdrop="static" 
							ng-click="viewDepartmentModel.chooseUpde()">选择</button>
					</span>
				</div>
			</div>
		</div>
		<div class="col-md-12 form-item">
			<div class="col-sm-3 col-md-3 form-title"><span style="color:red;">*</span>开始时间：</div>
			<div class=" col-sm-8 col-md-8 form-input">
			  	<div class="input-group col-sm-5 col-md-5 col-lg-5" style="width: 41.7%;" ng-class="{ 'has-error' : editForm.departmentFromDate.$dirty && editForm.departmentFromDate.$invalid }">
						<input name="departmentFromDate" 
							   ng-model="editModel.employee.departmentFromDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   is-open="viewModel.editDepartmenFromDateOpnened"
							   ng-click="viewModel.editDepartmenFromDateOpen($event)"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       required
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editDepartmenFromDateOpen($event)"><i class="fa-calendar"></i></span>
				</div>
				<div class="col-sm-2 col-md-2 form-title-center" style="width: 16.5%;">至</div>
				<div class="input-group col-sm-5 col-md-5" style="width: 41.7%;">
						<input name="departmentThruDate" 
							   ng-model="editModel.employee.departmentThruDate" 
							   ng-change="viewModel.dateChange()"
							   class="form-control datetime-picker" 
							   type="text"
							   autofocus="autofocus" 
							   maxLength="10"
							   z-datepicker-popup="{{viewModel.format}}"
							   ng-click="viewModel.editDepartmenThruDateOpen($event)"
							   is-open="viewModel.editDepartmenThruDateOpnened"
							   datepicker-options="viewModel.dateOptions"
						       close-text="Close"
						       readonly>
						<span class="input-group-addon cursorPointer" ng-click="viewModel.editDepartmenThruDateOpen($event)"><i class="fa-calendar"></i></span>
					</div>	
			</div>
		</div>
	
		<div class="col-md-12 form-item">		
				<div class="col-sm-3 col-md-3 form-title">岗位：</div>			
					<div class="col-sm-8 col-md-8 form-input" style="width: 17%;" >
						<button type="button" class="btn btn-success" ng-click="viewRoleModel.chooseUpde()">选择岗位</button>						
				  	</div> 
				 <div class="findN" id="fn"  ng-show="isShow">
				 <div class="col-sm-3 col-md-3 form-title" style="width:38%;"><b>离职人下属的申请是否流转至离职人N+1:  </b></div>
				 	 <div class="col-sm-8 col-md-8 form-input" style="width: 15%;margin:6px"  >
							&nbsp;是&nbsp;&nbsp;<input type="radio" ng-value="1" name="findN" ng-model="editModel.employee.findN"/>&nbsp;&nbsp;
							&nbsp;否&nbsp;&nbsp;<input type="radio" ng-value="0" name="findN" ng-model="editModel.employee.findN"/>
					</div>   		
				</div>											
		</div>
		
		<div class="col-md-12 form-item">
			<table class="table table-striped table-bordered" cellspacing="0" width="100%">
						<thead>
							<tr>
							    <td width="80">
									操作
								</td>
								<th>岗位编码</th>
								<th>岗位名称</th>
								<th>所属部门</th>
								<th style="width: 10%;">主次岗位</th>
								<th style="width: 20%;"><span style="color:red;">*</span>开始时间</th>
								<th style="width: 20%;">结束时间</th>
							</tr>
						</thead>
						<tbody>
							<tr ng-repeat="role in editModel.employee.roleList">
							    <td class="htgl-style10">
									<button type="button" 
											class="btn btn-danger" 
											ng-click="viewRoleModel.delRole(role)"
											ng-disabled="role.isRole==1">删除</button>	
								</td>
								<td>{{role.roleCode}}</td>
								<td>{{role.roleName}}</td>
								<td><span ng-hide="role.departmentName==null">({{role.departmentCode}}){{role.departmentName}}</span></td>
								<td>
									<select class="form-control" ng-model="role.isRole">
										<option value="0" ng-selected="role.isRole==0||role.isRole==null" >否</option>
										<option value="1" ng-selected="role.isRole==1">是</option>
									</select>
								</td>
								<td>
									<div class="input-group " style="width: 100%;">
										<input name="roleFromDate$index" 
											   ng-model="role.fromDate" 
											   class="form-control datetime-picker" 
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   ng-click="viewModel.editRoleFromDateOpen($event,role)"
											   is-open="role.startDateOpened"
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close">
										<span class="input-group-addon cursorPointer" ng-click="viewModel.editRoleFromDateOpen($event,role)"><i class="fa-calendar"></i></span>
								</div>
								</td>
								<td>
									<div class="input-group " style="width: 100%;">
										<input name="roleThruDate$index" 
											   ng-model="role.thruDate" 
											   class="form-control datetime-picker" 
											   ng-click="viewModel.editRoleThruDateOpen($event,role)"
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   is-open="role.endDateOpened"
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close">
										<span class="input-group-addon cursorPointer" ng-click="viewModel.editRoleThruDateOpen($event,role)"><i class="fa-calendar"></i></span>
									</div>	
								</td>
							</tr>
						</tbody>
					</table>
		</div>
	</div>	
</form>